package com.corpgovernment.travelstandard.mapper;


import com.corpgovernment.api.travelstandard.vo.QueryCitysVo;
import com.corpgovernment.organization.common.mybatis.TkMapper;
import com.corpgovernment.travelstandard.entity.db.TravelStandardAreaConfig;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * MbSupplierProductMapper数据库操作接口类
 **/
@Component
public interface AreaConfigMapper extends TkMapper<TravelStandardAreaConfig> {

    List<TravelStandardAreaConfig> list(TravelStandardAreaConfig model);

    /**
     * 查询某组织下不包含在ids中的区域
     *
     * @param orgId 组织id
     * @param ids   区域id集合
     * @return
     */
    List<TravelStandardAreaConfig> getByOrgIdNotInIds(@Param("orgId") String orgId, @Param("ids") List<Long> ids);

    List<TravelStandardAreaConfig> getByOrgIdAndTsIdAndCityIdOrCityCode(@Param("orgId") String orgId, @Param("tsId") Long tsId, @Param("cityId") Long cityId, @Param("cityCode") String cityCode);

    List<TravelStandardAreaConfig> getByOrgIdAndTsIdAndCityIdOrCountryCode(@Param("orgId") String orgId, @Param("tsId") Long tsId, @Param("cityId") Long cityId, @Param("countryCode") String CountryCode);

    List<TravelStandardAreaConfig> listByOrgIdAreaId(QueryCitysVo citysVo);

    TravelStandardAreaConfig findByAreaId(QueryCitysVo citysVo);

    int existName(TravelStandardAreaConfig model);

    int updateStatus(TravelStandardAreaConfig model);

    int updateAreaNameByOrgIdAndAreaType(@Param("areaName") String areaName, @Param("orgId") String orgId, @Param("areaType") String areaType,@Param("hotelType") String hotelType);
}
